package pers.cj.pdos.constant;

/**
 * 单号编号类型
 * 注意，请不要更改type
 */
public enum  OrderType {
    HXD("核销单编号", 1, "HXD"),
    XDD("销售订单编号", 2, "XDD"),
    XSD("销售单编号", 3, "XSD"),
    XTD("销售退货单编号", 4, "XTD"),
    JDD("进货订单编号", 5, "JDD"),
    JHD("进货单编号", 6, "JHD"),
    JTD("进货退货单编号", 7, "JTD"),
    PD("库存盘点单编号", 8, "PD"),
    ZCX("组装拆卸单编号", 9, "ZCX"),
    DBD("调拨单编号", 10, "DBD"),
    RKD("入库单编号", 11, "RKD"),
    CKD("出库单编号", 12, "CKD"),
    JRD("借入单编号", 13, "JRD"),
    JRG("借入归还单编号", 14, "JRG"),
    JCD("借出单编号", 15, "JCD"),
    JCG("借出归还单编号", 16, "JCG"),
    SZG("收支单编号", 17, "SZG"),
    SKD("收款单编号", 18, "SKD"),
    FKD("付款单编号", 19, "FKD"),
    KH("客户编号", 20, "KH"),
    GYS("供应商编号", 21, "GYS"),
    MB("商品模板编号", 22, "MB"),
    TC("商品套餐编号", 23, "TC"),
    SP("商品编号", 24, "SP"),
    MD("门店编号", 25, "MD"),
    CK("仓库编号", 26, "CK"),
    ;
    // 成员变量
    private String name;
    private int type;
    private String abbr;

    // 构造方法
    OrderType(String name, int type, String abbr) {
        this.name = name;
        this.type = type;
        this.abbr = abbr;
    }
    // 普通方法
    public static OrderType getObj(int type) {
        for (OrderType orderType : OrderType.values()) {
            if (orderType.getType() == type) {
                return orderType;
            }
        }
        return null;
    }

    // get set 方法
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }
    public void setType(int type) {
        this.type = type;
    }

    public String getAbbr() {
        return abbr;
    }

    public void setAbbr(String abbr) {
        this.abbr = abbr;
    }
}
